home *** CD-ROM | disk | FTP | other *** search
- Path: etek.chalmers.se!chalmers.se!sunic!lunic!eru.mt.luth.se!enterpoop.mit.edu!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!spool.mu.edu!agate!stanford.edu!rutgers!ub!dsinc!bagate!cbmvax!peter
- From: peter@cbmvax.commodore.com (Peter Cherna)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: BOOPSI and Styleguide question
- Message-ID: <37371@cbmvax.commodore.com>
- Date: 30 Nov 92 23:56:33 GMT
- References: <1est9mINN4rg@uni-paderborn.de>
- Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
- Organization: Commodore-Amiga, Inc. West Chester, PA.
- Lines: 51
-
- In article <1est9mINN4rg@uni-paderborn.de> fillg1@uni-paderborn.de (Michael Illgner) writes:
- >Hi,
- >
- >I have some questions concerning the BOOPSI gadgets and images. Is it legal to
- >change the colors of for example a LEFTARROW image by copying the screens DrawInfo
- >and supplying a new Pen array ? I want to interchange the colors of a button gadget,
- >so in its normal stage it should be grey an in selected state blue. Is this styleguide
- >conform ?
-
- You can't supply different pen arrays for different states, so this won't
- work. The system arrows are really designed to operate in a window border.
- The system really needs a set of arrows for 'inside the window' use.
-
- >Next question, I want to write an palette requester for Kick3.0, therefor I need a
- >button which is filled with the selected color and I want the normal 3D-look frame around
- >it. How can I accomplish this ? Is it possible to render a BOOPSI gadget using 2 images
- >like the interior filled rectangle and a frame ?
-
- Boopsi gadgets get GM_RENDER methods, in which they can do all kinds of
- rendering. This can include actual rendering and/or passing IM_DRAW to
- a gadget's image, which, if boopsi, can also do all kinds of rendering.
-
- The boopsi frameiclass image class supports exactly what you need. In
- your OM_NEW method for your gadget, you can create a frame with NewObject()
- on frameiclass, with IA_FrameType of FRAME_BUTTON. This will give you
- a filled frame, over which you can render your text. For example:
-
- case GM_RENDER:
-
- ... /* Get RP, etc */
- /* Now draw the frame, with state=IDS_NORMAL or IDS_SELECTED */
- DrawImageState( rp, myframeimage, 0, 0, state, drawinfo );
- PrintIText( rp, labeltext, 0, 0 );
-
- >Is it possible to get the images or even the gadgets from the gadtools gadgets ? This
- >would be the key for a uniform look of the gadgets.
-
- frameiclass provides you the ability to get GadTools-styled frames.
-
- NB: Under 2.0, only the thin frame (FRAME_DEFAULT) is supported by
- frameiclass. The GadTools-style FRAME_BUTTON and the GadTools string-gadget
- FRAME_RIDGE are new for V39.
-
- > Michael
-
- Peter
- --
- Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
- {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com
- My opinions do not necessarily represent the opinions of my employer.
- "Opinions enlarged to show detail"